<template>
    <div>
        <input
            type="checkbox"
            :checked="isChecked"
            :disabled="isDisabled"
        />
        <span v-if="$slot.default || label">
            <slot></slot>
            <template v-if="!$slot.default">{{label}}</template>
        </span>
    </div>
</template>

<script>
    export default {
        name: 'MyCheckbox',
        props: {
            disabled: Boolean,
            checked: Boolean,
            value: {}
        },
        computed: {
            isChecked() {
                return this.value
            },
            isDisabled() {
                return this.disabled;
            }
        },
        mounted() {
            console.log(this.value);
        }
    }
</script>

<style lang="scss" scoped>

</style>